﻿using System;
using System.Collections.Generic;
using YArchitech.Controls;

namespace YArchitech.Plumbing
{
	internal sealed class UsedWaterCalculateTypes
	{
		private UsedWaterCalculateTypes()
		{
			this.Initialize();
		}

		public void Initialize()
		{
			if (this.CalculateTypeArray != null && this.CalculateTypeArray.Count > 0)
			{
				return;
			}
			this.CalculateTypeArray = new List<UsedWaterCalculate>();
			try
			{
				this.CalculateTypeArray = HYCalSQLData.GetUsedWaterTypes();
			}
			catch (Exception ex)
			{
				YJKMessageBox.Error(ex.ToString());
			}
		}

		public List<UsedWaterCalculate> CalculateTypeArrayProp
		{
			get
			{
				return this.CalculateTypeArray;
			}
		}

		public static readonly UsedWaterCalculateTypes Instance = new UsedWaterCalculateTypes();

		public List<UsedWaterCalculate> CalculateTypeArray;
	}
}
